<include file="public@header"/>
<style>html{background-color: #ffffff !important;}</style>
</head>
<body>
<form method="post" class="layui-form js-ajax-form" action="{:url('AdminTag/addPost')}"  style="padding: 20px 30px 0 0;">
	<div class="layui-form-item">
		<label class="layui-form-label"><span class="form-required">*</span>标签名称</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input" name="name" value="" required  lay-verify="required" placeholder="请输入标签名" autocomplete="off">
		</div>
	</div>
	<div class="layui-form-item">
		<label class="layui-form-label">状态</label>
		<div class="layui-input-inline">
			<input type="checkbox" name="status" lay-skin="switch" value="1"  lay-text="启用|禁用" checked>
		</div>
	</div>
	<div class="layui-form-item">
		<div class="layui-input-block">
			<button type="submit" class="layui-btn js-ajax-submit js-close" id="js-ajax-submit">{:lang("SAVE")}</button>
		</div>
	</div>
</form>
<include file="public@script"/>
<script>
    layui.use('form',function(){
        var form=layui.form;
        form.on('switch', function(data) {
            $(data.elem).attr('type', 'hidden').val(this.checked ? 1 : 0);
        });
    });
</script>
</body>
</html>